<!DOCTYPE html>
<#assign dicSelect=JspTaglibs["http://www.casic304.cn/dicSelect"] />
<#assign secSelect=JspTaglibs["http://www.casic304.cn/secSelect"] />
<#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
<html>
<head>
    <meta charset="utf-8">
    <title>系统部署方式管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/forms/currencyCss.css">
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <style>
        .qbdms-TBinformation{margin-left: 0;font-size: 15px}
    </style>
</head>
<body class="listBody">

<div class="qbdms-bodyDiv" >
    <div class="qbdms-backDiv">
        <div class="layui-table-view-body" style="padding: 0 24px 24px;">
            <div class="qbdms-formTitle" style="border-bottom: 1px solid #E5F0FF">系统部署方式 <i  class="qbdms-returnOn closeWindow">返回</i></div>
            <form class="layui-form treeFormPreview"  requrl="${ctx}/qbdms/sysOrgDeploy/get"  lay-filter="wQbdDpaInfoDataForm" >


                <div class="layui-row">
                    <div class="" style="display: none;">
                        <label class="layui-form-label qbdms-label" title="主键">主键</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="id"  placeholder="请输入" fieldname="id"
                                   autocomplete="off" class="layui-input" maxlength="50">
                        </div>
                    </div>


                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="单位code">单位code<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
<#--                            <select class="layui-input filter-value" name="orgCode" lay-filter="xh" lay-verify="required" lay-search="" placeholder="请输入"/></select>-->
                                <input type="text" name="orgCode"  placeholder="请输入单位code" lay-verify="required"
                                       autocomplete="off" class="layui-input qiehuan"  maxlength="50">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="是否是上级">是否是上级<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <select class="layui-input filter-value" name="isParent" lay-filter="xh" lay-verify="required" lay-search="" placeholder="请输入" >
                                <option value="0">否</option>
                                <option value="1">是</option>
                            </select>
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="部署方式">部署方式<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">

                            <@dicSelect.dic name="depmethod" verify="required" reqtext="部署方式是必填项" filter="bsfs" nodeKey="bsfs" />
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="请求协议">请求协议<span id="reqqqxy" class="qiehuanred" style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">

                            <@dicSelect.dic name="protocol" verify="required" css="qiehuan"  reqtext="请求协议是必填项" nodeKey="qqxy" />
                        </div>
                    </div>


                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="接口地址">接口地址<span class="qiehuanred" style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="ip"  placeholder="ip:端口号/项目名/" lay-verify="required"
                                   autocomplete="off" class="layui-input qiehuan"  maxlength="50">
                        </div>
                    </div>


<#--                    <div style="width: 65%">-->
<#--                        <label class="layui-form-label qbdms-label" title="端口号">端口号<span class="qiehuanred" style="color: red;">*</span></label>-->
<#--                        <div class="layui-input-block qbdms-input">-->
<#--                            <input type="text" name="port"  placeholder="请输入" lay-verify="required|number"-->
<#--                                   autocomplete="off" class="layui-input qiehuan"-->
<#--                                   maxlength="50" >-->
<#--                        </div>-->
<#--                    </div>-->
                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="备注">备注</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="remarker"  placeholder=""
                                   autocomplete="off" class="layui-input"
                                   maxlength="50" >
                        </div>
                    </div>

                </div>

                <div class="layui-form-item btnformItem">
                    <p style="text-align: left;padding-left: 246px">
                    <span id="hideAndShow" style="">
                        <a lay-submit lay-filter="wQbdTecBasicmanage" class="layui-btn btn-n privateSubmit qbdms-oneBtn"
                           requrl="${ctx}/qbdms/sysOrgDeploy/save">提交</a>
                    </span>
                        <button type="reset" id="closeWindow" style="margin-left: 10px;" class="layui-btn layui-btn-sm qbdms-oneBtnLine closeWindow">取消</button>
                    </p>
                </div>

            </form>
        </div>
    </div>
</div>


<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>

<script>
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'common', 'laydate', 'jquery','qbdmsForm','publicMethods'], function () {
        var laydate = layui.laydate;
        var common = layui.common;
        var $ = layui.jquery;
        var form = layui.qbdmsForm;
        var publicMethods = layui.publicMethods;
        //关闭当前页面
        $(".closeWindow").click(function () {
            window.location.href = '${ctx}/qbdms/sysOrgDeploy/view/list';
        });

        var dw = eval('${dicList}'); //单位
        common.initDicData("orgCode", dw, "");

        form.on('select(bsfs)', function(data){
            if (data.value === "集中部署") {
                $('.qiehuan').attr("lay-verify","");
                $('.qiehuanred').hide();
            }
            else{
                $('.qiehuan').attr("lay-verify","required");
                $('.qiehuanred').show();
            }
        });

        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
            name: 'wQbdDpaInfoDataForm',
            idValue: "${id}",
            primary: "id",
            updateCallback: function (data) {
                if (common.filterRecord(data)) {
                    if ($(".privateSubmit")) {
                        $(".privateSubmit").attr("disabled", false).css("pointer-events", "auto");
                    }
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'}, function (index) {
                        layer.close(index);
                        window.location.href ='${ctx}/qbdms/sysOrgDeploy/view/list';
                    });
                } else {
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'});
                }
                return false;
            }

        });
    });
</script>
</body>
</html>